// 消除魔法字符串
const GEEK_TOKEN = "geek-token";

// 取token
export const getToken = () => localStorage.getItem(GEEK_TOKEN);
// 存token
export const setToken = token => localStorage.setItem(GEEK_TOKEN, token);
// 删除token
export const removeToken = () => localStorage.removeItem(GEEK_TOKEN);
// 创建根据token判断是否登录
export const isAuth = () => !!getToken();
